package net.adst.ui.mainframe.tabs.ourTab;

import net.adst.util.GBC;

import javax.swing.*;
import java.awt.*;
import java.util.TreeSet;

/**
 * Created with IntelliJ IDEA.
 * User: Администратор
 * Date: 03.02.13
 * Time: 13:57
 * To change this template use File | Settings | File Templates.
 */
public class TecNamesPanel extends JPanel {
    private static JScrollPane scrollPane;

    public TecNamesPanel(TreeSet<String> names) {
        scrollPane = new JScrollPane(this);
        scrollPane.setMinimumSize(new Dimension(50, 50));
        add(new JCheckBox("name"), new GBC(0, 0));
        if (names != null) {
            for (String name : names) {
                scrollPane.add(new JCheckBox(name));
            }
        }
        add(scrollPane, new GBC(0, 0).setFill(GBC.BOTH).setWeight(1, 1));
    }

    public static void setNames(TreeSet<String> names) {
        if (names != null) {
            for (String name : names) {
//                scrollPane.add(new JCheckBox(name));
            }
        }
    }
}
